The present disclosure relates to debugging server applications, and more specifically, to non-blocking runtime application debugging for a single threaded server environment.
Increasingly, JavaScript is gaining popularity for use on back end servers for web applications as JavaScript helps simplify real-time, two-way connections, where both the client and server can initiate communication through use of push technology over websockets. Additionally, JavaScript server runtime environments, such as Node.js, generally are event-driven and allow for non-blocking I/O mechanisms to handle data-intensive, real-time distributed applications, which help improve server performance, especially applications that have a high number of I/O operations.
However, unlike more traditional server runtime environments, which may spawn (e.g., create) a new thread for each connection request, JavaScript server runtimes may operate with a single threaded event loop. In such an environment, each incoming request is received by a single thread and passed on to background workers. This allows many time consuming I/O operations to operate concurrently in the background while the single thread proceeds.
When software bugs are encountered, debugging using a runtime debugger which allows, for example, pausing, examining, altering variables, and stepping through code may be useful. However, debugging operations in JavaScript server runtimes executing on the single thread presents challenges as debugging activity may stop operations on the single thread, blocking the execution of any new incoming requests or processing completed requests.